package com.dong.auth.security.userdetails;


import java.io.Serializable;
import java.util.Collection;

/**
 * 默认的安全模块用户实现类
 *
 * @author zhaodc
 * @date 2021/10/20 10:26
 **/
public class DefaultSecurityUser implements SecurityUser, Serializable {
    private static final long serialVersionUID = 5626012509778972995L;

    private String username;
    private String password;
    private Integer state;
    private Collection<String> authorities;

    @Override
    public Collection<String> getAuthorities() {
        return this.authorities;
    }

    @Override
    public String getPassword() {
        return this.password;
    }

    @Override
    public String getUsername() {
        return this.username;
    }

    @Override
    public boolean isCredentialsExpired() {
        return false;
    }

    @Override
    public boolean isLocked() {
        return false;
    }

    public Integer getState() {
        return state;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public void setAuthorities(Collection<String> authorities) {
        this.authorities = authorities;
    }
}
